package nl.saxion.cryptobazen.ui;

import java.awt.Dimension;
import java.awt.FlowLayout;

import javax.swing.JPanel;

import nl.saxion.cryptobazen.model.Partij;
import nl.saxion.cryptobazen.model.Partijen;

public class PartijOverzichtPanel extends JPanel
{

	private Partijen partijen;

	/**
	 * Create the panel.
	 */
	public PartijOverzichtPanel(Partijen partijen)
	{
		setPreferredSize(new Dimension(300, getHeight()));
		this.partijen = partijen;
		setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));

		for (Partij partij : partijen.getPartijen())
		{
			add(new PartijPanel(partij));
		}
	}
}
